<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>不带条件</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
</head>
<body>
<div th:fragment="page">
    <style>
        ul{border:0; margin:0; padding:0;}

        #pagination-digg li{
            /*border:solid 1px #008ff5; margin:0; padding:0;*/
            font-size:11px;
            list-style:none;
            margin-right:2px;
        }
        #pagination-digg a{
            border:solid 1px #9aafe5;
            margin-right:2px;
        }
        #pagination-digg .previous-off,
        #pagination-digg .next-off {
            border:solid 1px #DEDEDE;
            color:#888888;
            display:block;
            float:left;
            font-weight:bold;
            margin-right:2px;
            padding:3px 4px;
        }
        #pagination-digg .next a,
        #pagination-digg .previous a {
            font-weight:bold;
        }
        #pagination-digg .active{
            background:#2e6ab1;
            color:#FFFFFF;
            font-weight:bold;
            display:block;
            float:left;
            padding:4px 6px;
        }
        #pagination-digg a:link,
        #pagination-digg a:visited {
            /*color:#0e509e;*/
            display:block;
            float:left;
            padding:3px 6px;
            text-decoration:none;
        }
        #pagination-digg a:hover{
            border:solid 1px #0e509e
        }
    </style>

    <div style="float: left;margin: auto 30px">
        当前第<span th:text="${page.pageNum}"></span>页
        总记录数<span th:text="${page.total}"></span>
    </div>
    <div style="width:300px;margin: auto">
        <ul  id="pagination-digg">
            <li><a th:text="首页" th:if="${page.pageNum>=1}" th:href="@{${path}}"></a></li>
            <li><a th:text="上一页" th:if="${page.pageNum>1}" th:href="@{${path}+${page.pageNum - 1}}"></a></li>
            <li><a th:href="@{${path}+${i}}" th:each="i:${#numbers.sequence(1,page.pages)}" th:text="${i}"th:class="${page.pageNum==i}? 'page active':'page'"></a></li>
            <li><a th:text="下一页" th:if="${page.pageNum<page.pages}" th:href="@{${path}+${page.pageNum+1}}"></a></li>
            <li> <a th:text="尾页" th:if="${page.pageNum<=page.pages}" th:href="@{${path}+${page.pages}}"></a></li>
        </ul>

    </div>

</div>
</body>
</html>
